/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 说明：
 * Entity Name 员工信息表
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TEmployee")
public class TEmployee implements Serializable{
	private static final long serialVersionUID = 1L;

	private String EmployeeID;// 员工编号 CHAR(15)PK
	
	private String EmployeeSn;//员工号
	
	private String Name;// 员工姓名 CHAR(20)
	
	private String UserName;// 员工用户名 CHAR(15)
	
	private String Password;//密码CHAR(20)
	
	private String Job;// 员工职位 VARCHAR(30)
	
	private byte Sex;// 员工性别TINYINT1为男 2为女
	
	private Date BirthDate;// 出生日期DATE
	
	private String Address;// 住址VARCHAR(128)
	
	private String Mobile;// 手机VARCHAR(30)
	
	private String Phone;// 电话
	
	private boolean IsValid;// 是否有效boolean
	
	private Date HappenTime=new Date();// 创建日期 DATETIME
	
	private String Operator;// 创建人CHAR(15)
	
	private String NationalID;// 身份证号CHAR(32)
	
	private byte Edulevel;// 文化程度TINYINT 1为未知 2为小学 2为中学 3为高中 4为大学 5为硕士 6为博士
	
	private String ZipCode;// 邮编 CHAR(6)
	
	private String Remark;// 备注 VARCHAR(512)
	
	private double Salary;// 标准工资 DECIMAL(20,3)
	
	private double Allowance;// 津贴
	
	private Date EmployStart;// 合同开始期DATE
	
	private Date EmployEnd;// 合同到期
	
	private TDept TDept;// 所属部门FK
	
	private TRole TRole;//角色
	
	private boolean IsClientService;//是否开启客服
	
	private String CSName;//客服名
	
	private String CSMobile;//客服电话
	
	private String CardNum;//员工卡号
	
	private Set<TOpLog> TOpLogs=new HashSet<TOpLog>(0);//操作日记
	
	public TEmployee(){};
	public TEmployee(String employeeID, String name) {
		super();
		EmployeeID = employeeID;
		Name = name;
	}
	
	public TEmployee(String employeeID, String employeeSn, String name) {
		super();
		EmployeeID = employeeID;
		EmployeeSn = employeeSn;
		Name = name;
	}
	@Id
	@Column(name = "EmployeeID", length=15)
	public String getEmployeeID() {
		return EmployeeID;
	}
	public void setEmployeeID(String employeeID) {
		EmployeeID = employeeID;
	}
	
	@Column(name = "EmployeeSn", length=15)
	public String getEmployeeSn() {
		return EmployeeSn;
	}
	public void setEmployeeSn(String employeeSn) {
		EmployeeSn = employeeSn;
	}
	@Column(name = "Name", length=20)
	public String getName() {
		return Name;
	}
	public void setName(String name) {
		Name = name;
	}
	@Column(name = "UserName", length=15)
	public String getUserName() {
		return UserName;
	}

	public void setUserName(String userName) {
		UserName = userName;
	}
	@Column(name = "Password", length=20)
	public String getPassword() {
		return Password;
	}
	public void setPassword(String password) {
		Password = password;
	}
	@Column(name = "Job", length=30)
	public String getJob() {
		return Job;
	}
	public void setJob(String job) {
		Job = job;
	}
	@Column(name = "Sex")
	public byte getSex() {
		return Sex;
	}
	public void setSex(byte sex) {
		Sex = sex;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "BirthDate", nullable = false, length = 19)
	public Date getBirthDate() {
		return BirthDate;
	}
	public void setBirthDate(Date birthDate) {
		BirthDate = birthDate;
	}
	@Column(name = "Address", length=128)
	public String getAddress() {
		return Address;
	}
	public void setAddress(String address) {
		Address = address;
	}
	@Column(name = "Mobile", length=30)
	public String getMobile() {
		return Mobile;
	}
	public void setMobile(String mobile) {
		Mobile = mobile;
	}
	@Column(name = "Phone", length=30)
	public String getPhone() {
		return Phone;
	}
	public void setPhone(String phone) {
		Phone = phone;
	}
	@Column(name = "IsValid")
	public boolean isIsValid() {
		return IsValid;
	}
	public void setIsValid(boolean isValid) {
		IsValid = isValid;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HappenTime", nullable = false, length = 19)
	public Date getHappenTime() {
		return HappenTime;
	}
	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}
	@Column(name = "Operator", length=15)
	public String getOperator() {
		return Operator;
	}
	public void setOperator(String operator) {
		Operator = operator;
	}
	@Column(name = "NationalID", length=32)
	public String getNationalID() {
		return NationalID;
	}
	public void setNationalID(String nationalID) {
		NationalID = nationalID;
	}
	@Column(name = "Edulevel")
	public byte getEdulevel() {
		return Edulevel;
	}
	public void setEdulevel(byte edulevel) {
		Edulevel = edulevel;
	}
	@Column(name = "ZipCode", length=6)
	public String getZipCode() {
		return ZipCode;
	}
	public void setZipCode(String zipCode) {
		ZipCode = zipCode;
	}
	@Column(name = "Remark", length=512)
	public String getRemark() {
		return Remark;
	}
	public void setRemark(String remark) {
		Remark = remark;
	}
	@Column(name = "Salary", precision = 20, scale = 3)
	public double getSalary() {
		return Salary;
	}
	public void setSalary(double salary) {
		Salary = salary;
	}
	@Column(name = "Allowance", precision = 20, scale = 3)
	public double getAllowance() {
		return Allowance;
	}
	public void setAllowance(double allowance) {
		Allowance = allowance;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "EmployStart", nullable = false, length = 19)
	public Date getEmployStart() {
		return EmployStart;
	}
	public void setEmployStart(Date employStart) {
		EmployStart = employStart;
	}
	@Temporal(TemporalType.DATE)
	@Column(name = "EmployEnd", nullable = false, length = 19)
	public Date getEmployEnd() {
		return EmployEnd;
	}
	public void setEmployEnd(Date employEnd) {
		EmployEnd = employEnd;
	}
	@ManyToOne
	@JoinColumn(name="DeptID")
	public TDept getTDept() {
		return TDept;
	}
	public void setTDept(TDept tDept) {
		TDept = tDept;
	}
	@ManyToOne
	@JoinColumn(name="RoleID")
	public TRole getTRole() {
		return TRole;
	}
	public void setTRole(TRole tRole) {
		TRole = tRole;
	}
	@OneToMany(mappedBy="TEmployee")
	@JoinColumn(name="EmployeeID")
	public Set<TOpLog> getTOpLogs() {
		return TOpLogs;
	}
	public void setTOpLogs(Set<TOpLog> tOpLogs) {
		TOpLogs = tOpLogs;
	}
	
	@Column(name = "IsClientService")
	public boolean isIsClientService() {
		return IsClientService;
	}
	public void setIsClientService(boolean isClientService) {
		IsClientService = isClientService;
	}
	
	@Column(name = "CSName", length=32)
	public String getCSName() {
		return CSName;
	}
	public void setCSName(String cSName) {
		CSName = cSName;
	}
	
	@Column(name = "CSMobile", length=32)
	public String getCSMobile() {
		return CSMobile;
	}
	public void setCSMobile(String cSMobile) {
		CSMobile = cSMobile;
	}
	
	@Column(name = "CardNum", length=15)
	public String getCardNum() {
		return CardNum;
	}
	public void setCardNum(String cardNum) {
		CardNum = cardNum;
	}
	
}
